import request from '@/utils/request'

// 查询保险合同主列表
export function listContract(query) {
    return request({
        url: '/insurance/contract/list',
        method: 'get',
        params: query
    })
}

// 查询保险合同主详细
export function getContract(id) {
    return request({
        url: '/insurance/contract/' + id,
        method: 'get'
    })
}

// 新增保险合同主
export function addContract(data) {
    return request({
        url: '/insurance/contract',
        method: 'post',
        data: data
    })
}

// 修改保险合同主
export function updateContract(data) {
    return request({
        url: '/insurance/contract',
        method: 'put',
        data: data
    })
}

// 删除保险合同主
export function delContract(id) {
    return request({
        url: '/insurance/contract/' + id,
        method: 'delete'
    })
}

// 查询保险合同主详细
export function getContractDetail(id) {
    return request({
        url: '/insurance/contract/getContractDetail?insureId=' + id,
        method: 'get'
    })
}

// 理赔详情
export function getSettleDetail(id) {
    return request({
        url: '/insurance/settle/getSettleDetail?insureId=' + id,
        method: 'get'
    })
}

// 风控详情
export function getRiskDetail(id) {
    return request({
        url: '/insurance/risk/getRiskDetail?insureId=' + id,
        method: 'get'
    })
}

// 共保详情
export function getContractCoinsuranceList(id) {
    return request({
        url: '/insurance/coinsurance/getContractCoinsuranceList?insureId=' + id,
        method: 'get'
    })
}
// 保费缴纳信息
export function getContractPremium(id) {
    return request({
        url: '/insurance/contract/getContractPremium?insureId=' + id,
        method: 'get'
    })
}
// 经纪/代理佣金支付信息
export function getContractPay(id) {
    return request({
        url: '/insurance/contract/getContractPay?insureId=' + id,
        method: 'get'
    })
}
